-- GENERATED SPELL FOR [Kul'galar Oracle] --


function spell0_30751(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_30751', 3500, 1)
end

function spell1_30751(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(31516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30751', 2500, 1)
end

function spell2_30751(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30751', 3000, 1)
end

function Sorts_30751(pUnit, Event)
local choix_sorts_30751 = math.random(0, 2)
if choix_sorts_30751 == 0 then
pUnit:RegisterEvent('spell0_30751', 1, 1)
end
if choix_sorts_30751 == 1 then
pUnit:RegisterEvent('spell1_30751', 1, 1)
end
if choix_sorts_30751 == 2 then
pUnit:RegisterEvent('spell2_30751', 1, 1)
end
end

function mob30751_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30751', math.random(1500, 3000), 1)
end

function mob30751_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30751_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30751_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30751, 1, 'mob30751_Action')
RegisterUnitEvent(30751, 2, 'mob30751_Leave')
RegisterUnitEvent(30751, 3, 'mob30751_Kill')
RegisterUnitEvent(30751, 4, 'mob30751_Die')
